package club.riven.manager;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;

/**
 * @author 陈浩
 * @date 2021/12/9
 */
public class RedissonManager {

    private static RedissonClient client;

    public static void defaultRefresh(){

        Config config = new Config();
//        config.setTransportMode(TransportMode.EPOLL);
        config.useSingleServer()
                .setAddress("redis://127.0.0.1:6379");

        client = Redisson.create(config);
    }

    public static RedissonClient getClient(){
        return client;
    }
}
